#ifndef __SW_LIGHT_SPRITE_H__
#define __SW_LIGHT_SPRITE_H__

#include "components/3D/sweety_3D_Engine.h"
#include "components/3D/sweety_3D_Vao.h"
#include "components/3D/sweety_3D_Sprite.h"
#include <map>

namespace SW
{
	class Material;
	class PointLight;
	class SW_API LightSprite : public Sprite
	{
	public:
						LightSprite();
		virtual			~LightSprite();

		virtual void	Render(const mat4& modelTrans) override;

		void			AddPointlight(const char* name);
		int				GetPointlightNumber() const;

	private:
		void			InitShaders();
		void			InitLightShaders();
		void			InitLampShaders();	

		void			InitLights();
		void			InitPointlights(unsigned int number);
		
	private:
		MainProgramObj  m_LightShader;
		MainProgramObj  m_LampShader;

		VaoClass*		m_VaoPtr{ nullptr };
		VaoClass*		m_LightVaoPtr{ nullptr };

		SwTexture		m_Texture_diffuse;
		SwTexture		m_Texture_specular;

		Material*		m_Material{ nullptr };
		std::map<unsigned int, PointLight*>	m_Pointlights;
		int				m_PointlightNum;

		bool			m_IsResetCampos{ false };
		
	};
}



#endif